3.3.3 \(\int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x))^2 \, dx\) [203]

3.3.3.1 Optimal result
3.3.3.2 Mathematica [A] (verified)
3.3.3.3 Rubi [A] (verified)
3.3.3.4 Maple [A] (verified)
3.3.3.5 Fricas [A] (verification not implemented)
3.3.3.6 Sympy [F]
3.3.3.7 Maxima [A] (verification not implemented)
3.3.3.8 Giac [A] (verification not implemented)
3.3.3.9 Mupad [B] (verification not implemented)

3.3.3.1 Optimal result

Integrand size = 31, antiderivative size = 257 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x))^2 \, dx=\frac {a^3 \left (20 c^2+30 c d+13 d^2\right ) \text {arctanh}(\sin (e+f x))}{8 f}+\frac {a^3 \left (2 c^4-15 c^3 d+72 c^2 d^2+180 c d^3+76 d^4\right ) \tan (e+f x)}{30 d^2 f}+\frac {a^3 \left (4 c^3-30 c^2 d+146 c d^2+195 d^3\right ) \sec (e+f x) \tan (e+f x)}{120 d f}+\frac {a^3 \left (2 c^2-15 c d+76 d^2\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{60 d^2 f}-\frac {a^3 (2 c-11 d) (c+d \sec (e+f x))^3 \tan (e+f x)}{20 d^2 f}+\frac {\left (a^3+a^3 \sec (e+f x)\right ) (c+d \sec (e+f x))^3 \tan (e+f x)}{5 d f} \]

output
1/8*a^3*(20*c^2+30*c*d+13*d^2)*arctanh(sin(f*x+e))/f+1/30*a^3*(2*c^4-15*c^ 
3*d+72*c^2*d^2+180*c*d^3+76*d^4)*tan(f*x+e)/d^2/f+1/120*a^3*(4*c^3-30*c^2* 
d+146*c*d^2+195*d^3)*sec(f*x+e)*tan(f*x+e)/d/f+1/60*a^3*(2*c^2-15*c*d+76*d 
^2)*(c+d*sec(f*x+e))^2*tan(f*x+e)/d^2/f-1/20*a^3*(2*c-11*d)*(c+d*sec(f*x+e 
))^3*tan(f*x+e)/d^2/f+1/5*(a^3+a^3*sec(f*x+e))*(c+d*sec(f*x+e))^3*tan(f*x+ 
e)/d/f
 
3.3.3.2 Mathematica [A] (verified)

Time = 4.43 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.51 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x))^2 \, dx=\frac {a^3 \left (15 \left (20 c^2+30 c d+13 d^2\right ) \text {arctanh}(\sin (e+f x))+\tan (e+f x) \left (15 \left (12 c^2+30 c d+13 d^2\right ) \sec (e+f x)+30 d (2 c+3 d) \sec ^3(e+f x)+8 \left (60 (c+d)^2+5 \left (c^2+6 c d+5 d^2\right ) \tan ^2(e+f x)+3 d^2 \tan ^4(e+f x)\right )\right )\right )}{120 f} \]

input
Integrate[Sec[e + f*x]*(a + a*Sec[e + f*x])^3*(c + d*Sec[e + f*x])^2,x]
 
output
(a^3*(15*(20*c^2 + 30*c*d + 13*d^2)*ArcTanh[Sin[e + f*x]] + Tan[e + f*x]*( 
15*(12*c^2 + 30*c*d + 13*d^2)*Sec[e + f*x] + 30*d*(2*c + 3*d)*Sec[e + f*x] 
^3 + 8*(60*(c + d)^2 + 5*(c^2 + 6*c*d + 5*d^2)*Tan[e + f*x]^2 + 3*d^2*Tan[ 
e + f*x]^4))))/(120*f)
 
3.3.3.3 Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 309, normalized size of antiderivative = 1.20, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.355, Rules used = {3042, 4475, 101, 25, 27, 90, 60, 60, 60, 45, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sec (e+f x) (a \sec (e+f x)+a)^3 (c+d \sec (e+f x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^3 \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2dx\)

\(\Big \downarrow \) 4475

\(\displaystyle -\frac {a^2 \tan (e+f x) \int \frac {(\sec (e+f x) a+a)^{5/2} (c+d \sec (e+f x))^2}{\sqrt {a-a \sec (e+f x)}}d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 101

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (-\frac {\int -\frac {a^2 (\sec (e+f x) a+a)^{5/2} \left (5 c^2+3 d c+d^2+3 d (2 c+d) \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)}}d\sec (e+f x)}{5 a^2}-\frac {d \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2} (c+d \sec (e+f x))}{5 a^2}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\int \frac {a^2 (\sec (e+f x) a+a)^{5/2} \left (5 c^2+3 d c+d^2+3 d (2 c+d) \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)}}d\sec (e+f x)}{5 a^2}-\frac {d \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2} (c+d \sec (e+f x))}{5 a^2}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {1}{5} \int \frac {(\sec (e+f x) a+a)^{5/2} \left (5 c^2+3 d c+d^2+3 d (2 c+d) \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)}}d\sec (e+f x)-\frac {d \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2} (c+d \sec (e+f x))}{5 a^2}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 90

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {1}{5} \left (\frac {1}{4} \left (20 c^2+30 c d+13 d^2\right ) \int \frac {(\sec (e+f x) a+a)^{5/2}}{\sqrt {a-a \sec (e+f x)}}d\sec (e+f x)-\frac {3 d (2 c+d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2}}{4 a^2}\right )-\frac {d \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2} (c+d \sec (e+f x))}{5 a^2}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 60

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {1}{5} \left (\frac {1}{4} \left (20 c^2+30 c d+13 d^2\right ) \left (\frac {5}{3} a \int \frac {(\sec (e+f x) a+a)^{3/2}}{\sqrt {a-a \sec (e+f x)}}d\sec (e+f x)-\frac {\sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{5/2}}{3 a}\right )-\frac {3 d (2 c+d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2}}{4 a^2}\right )-\frac {d \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2} (c+d \sec (e+f x))}{5 a^2}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 60

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {1}{5} \left (\frac {1}{4} \left (20 c^2+30 c d+13 d^2\right ) \left (\frac {5}{3} a \left (\frac {3}{2} a \int \frac {\sqrt {\sec (e+f x) a+a}}{\sqrt {a-a \sec (e+f x)}}d\sec (e+f x)-\frac {\sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 a}\right )-\frac {\sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{5/2}}{3 a}\right )-\frac {3 d (2 c+d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2}}{4 a^2}\right )-\frac {d \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2} (c+d \sec (e+f x))}{5 a^2}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 60

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {1}{5} \left (\frac {1}{4} \left (20 c^2+30 c d+13 d^2\right ) \left (\frac {5}{3} a \left (\frac {3}{2} a \left (a \int \frac {1}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)-\frac {\sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a}\right )-\frac {\sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 a}\right )-\frac {\sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{5/2}}{3 a}\right )-\frac {3 d (2 c+d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2}}{4 a^2}\right )-\frac {d \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2} (c+d \sec (e+f x))}{5 a^2}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 45

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {1}{5} \left (\frac {1}{4} \left (20 c^2+30 c d+13 d^2\right ) \left (\frac {5}{3} a \left (\frac {3}{2} a \left (2 a \int \frac {1}{-\frac {(a-a \sec (e+f x)) a}{\sec (e+f x) a+a}-a}d\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {\sec (e+f x) a+a}}-\frac {\sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a}\right )-\frac {\sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 a}\right )-\frac {\sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{5/2}}{3 a}\right )-\frac {3 d (2 c+d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2}}{4 a^2}\right )-\frac {d \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2} (c+d \sec (e+f x))}{5 a^2}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 218

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {1}{5} \left (\frac {1}{4} \left (20 c^2+30 c d+13 d^2\right ) \left (\frac {5}{3} a \left (\frac {3}{2} a \left (-2 \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a \sec (e+f x)+a}}\right )-\frac {\sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a}\right )-\frac {\sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{2 a}\right )-\frac {\sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{5/2}}{3 a}\right )-\frac {3 d (2 c+d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2}}{4 a^2}\right )-\frac {d \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{7/2} (c+d \sec (e+f x))}{5 a^2}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

input
Int[Sec[e + f*x]*(a + a*Sec[e + f*x])^3*(c + d*Sec[e + f*x])^2,x]
 
output
-((a^2*(-1/5*(d*Sqrt[a - a*Sec[e + f*x]]*(a + a*Sec[e + f*x])^(7/2)*(c + d 
*Sec[e + f*x]))/a^2 + ((-3*d*(2*c + d)*Sqrt[a - a*Sec[e + f*x]]*(a + a*Sec 
[e + f*x])^(7/2))/(4*a^2) + ((20*c^2 + 30*c*d + 13*d^2)*(-1/3*(Sqrt[a - a* 
Sec[e + f*x]]*(a + a*Sec[e + f*x])^(5/2))/a + (5*a*(-1/2*(Sqrt[a - a*Sec[e 
 + f*x]]*(a + a*Sec[e + f*x])^(3/2))/a + (3*a*(-2*ArcTan[Sqrt[a - a*Sec[e 
+ f*x]]/Sqrt[a + a*Sec[e + f*x]]] - (Sqrt[a - a*Sec[e + f*x]]*Sqrt[a + a*S 
ec[e + f*x]])/a))/2))/3))/4)/5)*Tan[e + f*x])/(f*Sqrt[a - a*Sec[e + f*x]]* 
Sqrt[a + a*Sec[e + f*x]]))
 

3.3.3.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 45
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] && EqQ[b*c + a*d, 0] &&  !GtQ[c, 0]
 

rule 60
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[ 
(a + b*x)^(m + 1)*((c + d*x)^n/(b*(m + n + 1))), x] + Simp[n*((b*c - a*d)/( 
b*(m + n + 1)))   Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, 
 c, d}, x] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !Integer 
Q[n] || (GtQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinear 
Q[a, b, c, d, m, n, x]
 

rule 90
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), 
 x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p 
+ 2))   Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, 
p}, x] && NeQ[n + p + 2, 0]
 

rule 101
Int[((a_.) + (b_.)*(x_))^2*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^( 
p_), x_] :> Simp[b*(a + b*x)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + 
 p + 3))), x] + Simp[1/(d*f*(n + p + 3))   Int[(c + d*x)^n*(e + f*x)^p*Simp 
[a^2*d*f*(n + p + 3) - b*(b*c*e + a*(d*e*(n + 1) + c*f*(p + 1))) + b*(a*d*f 
*(n + p + 4) - b*(d*e*(n + 2) + c*f*(p + 2)))*x, x], x], x] /; FreeQ[{a, b, 
 c, d, e, f, n, p}, x] && NeQ[n + p + 3, 0]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4475
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Simp[a 
^2*g*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])) 
 Subst[Int[(g*x)^(p - 1)*(a + b*x)^(m - 1/2)*((c + d*x)^n/Sqrt[a - b*x]), x 
], x, Csc[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[ 
b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p, 1] || In 
tegerQ[m - 1/2])
 
3.3.3.4 Maple [A] (verified)

Time = 4.54 (sec) , antiderivative size = 257, normalized size of antiderivative = 1.00

method result size
norman \(\frac {-\frac {32 a^{3} \left (20 c^{2}+30 c d +13 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{15 f}+\frac {7 a^{3} \left (20 c^{2}+30 c d +13 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{6 f}-\frac {a^{3} \left (20 c^{2}+30 c d +13 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{4 f}-\frac {a^{3} \left (44 c^{2}+98 c d +51 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {a^{3} \left (212 c^{2}+366 c d +133 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{6 f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{5}}-\frac {a^{3} \left (20 c^{2}+30 c d +13 d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{8 f}+\frac {a^{3} \left (20 c^{2}+30 c d +13 d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{8 f}\) \(257\)
parts \(\frac {\left (2 a^{3} c d +3 a^{3} d^{2}\right ) \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )}{f}+\frac {\left (3 c^{2} a^{3}+2 a^{3} c d \right ) \tan \left (f x +e \right )}{f}-\frac {\left (c^{2} a^{3}+6 a^{3} c d +3 a^{3} d^{2}\right ) \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )}{f}+\frac {\left (3 c^{2} a^{3}+6 a^{3} c d +a^{3} d^{2}\right ) \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )}{f}-\frac {a^{3} d^{2} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )}{f}+\frac {c^{2} a^{3} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}\) \(259\)
parallelrisch \(\frac {26 a^{3} \left (-\frac {75 \left (\frac {\cos \left (5 f x +5 e \right )}{10}+\frac {\cos \left (3 f x +3 e \right )}{2}+\cos \left (f x +e \right )\right ) \left (c^{2}+\frac {3}{2} c d +\frac {13}{20} d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{26}+\frac {75 \left (\frac {\cos \left (5 f x +5 e \right )}{10}+\frac {\cos \left (3 f x +3 e \right )}{2}+\cos \left (f x +e \right )\right ) \left (c^{2}+\frac {3}{2} c d +\frac {13}{20} d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{26}+\left (\frac {57}{26} c d +\frac {75}{52} d^{2}+\frac {9}{13} c^{2}\right ) \sin \left (2 f x +2 e \right )+\left (3 c d +\frac {19}{13} d^{2}+\frac {37}{26} c^{2}\right ) \sin \left (3 f x +3 e \right )+\left (\frac {45}{52} c d +\frac {3}{8} d^{2}+\frac {9}{26} c^{2}\right ) \sin \left (4 f x +4 e \right )+\left (\frac {9}{13} c d +\frac {19}{65} d^{2}+\frac {11}{26} c^{2}\right ) \sin \left (5 f x +5 e \right )+\sin \left (f x +e \right ) \left (\frac {30}{13} c d +\frac {20}{13} d^{2}+c^{2}\right )\right )}{3 f \left (\cos \left (5 f x +5 e \right )+5 \cos \left (3 f x +3 e \right )+10 \cos \left (f x +e \right )\right )}\) \(273\)
derivativedivides \(\frac {-c^{2} a^{3} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+2 a^{3} c d \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )-a^{3} d^{2} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )+3 c^{2} a^{3} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-6 a^{3} c d \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+3 a^{3} d^{2} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )+3 c^{2} a^{3} \tan \left (f x +e \right )+6 a^{3} c d \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-3 a^{3} d^{2} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+c^{2} a^{3} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )+2 a^{3} c d \tan \left (f x +e \right )+a^{3} d^{2} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )}{f}\) \(385\)
default \(\frac {-c^{2} a^{3} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+2 a^{3} c d \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )-a^{3} d^{2} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )+3 c^{2} a^{3} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-6 a^{3} c d \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+3 a^{3} d^{2} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )+3 c^{2} a^{3} \tan \left (f x +e \right )+6 a^{3} c d \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-3 a^{3} d^{2} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+c^{2} a^{3} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )+2 a^{3} c d \tan \left (f x +e \right )+a^{3} d^{2} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )}{f}\) \(385\)
risch \(-\frac {i a^{3} \left (-440 c^{2}-4800 c d \,{\mathrm e}^{4 i \left (f x +e \right )}-3360 c d \,{\mathrm e}^{2 i \left (f x +e \right )}-450 d \,{\mathrm e}^{i \left (f x +e \right )} c -720 c d -304 d^{2}-1520 d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-195 d^{2} {\mathrm e}^{i \left (f x +e \right )}-1140 c d \,{\mathrm e}^{3 i \left (f x +e \right )}+450 c d \,{\mathrm e}^{9 i \left (f x +e \right )}-2400 c d \,{\mathrm e}^{6 i \left (f x +e \right )}-240 c d \,{\mathrm e}^{8 i \left (f x +e \right )}+1140 c d \,{\mathrm e}^{7 i \left (f x +e \right )}-2720 c^{2} {\mathrm e}^{4 i \left (f x +e \right )}-1840 c^{2} {\mathrm e}^{2 i \left (f x +e \right )}-360 c^{2} {\mathrm e}^{3 i \left (f x +e \right )}-750 d^{2} {\mathrm e}^{3 i \left (f x +e \right )}+360 c^{2} {\mathrm e}^{7 i \left (f x +e \right )}+180 c^{2} {\mathrm e}^{9 i \left (f x +e \right )}+750 d^{2} {\mathrm e}^{7 i \left (f x +e \right )}-180 c^{2} {\mathrm e}^{i \left (f x +e \right )}-360 c^{2} {\mathrm e}^{8 i \left (f x +e \right )}+195 d^{2} {\mathrm e}^{9 i \left (f x +e \right )}-2320 d^{2} {\mathrm e}^{4 i \left (f x +e \right )}-1680 c^{2} {\mathrm e}^{6 i \left (f x +e \right )}-720 d^{2} {\mathrm e}^{6 i \left (f x +e \right )}\right )}{60 f \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )^{5}}+\frac {5 c^{2} a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{2 f}+\frac {15 a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c d}{4 f}+\frac {13 a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) d^{2}}{8 f}-\frac {5 c^{2} a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{2 f}-\frac {15 a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c d}{4 f}-\frac {13 a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) d^{2}}{8 f}\) \(495\)

input
int(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c+d*sec(f*x+e))^2,x,method=_RETURNVERBO 
SE)
 
output
(-32/15*a^3*(20*c^2+30*c*d+13*d^2)/f*tan(1/2*f*x+1/2*e)^5+7/6*a^3*(20*c^2+ 
30*c*d+13*d^2)/f*tan(1/2*f*x+1/2*e)^7-1/4*a^3*(20*c^2+30*c*d+13*d^2)/f*tan 
(1/2*f*x+1/2*e)^9-1/4*a^3*(44*c^2+98*c*d+51*d^2)/f*tan(1/2*f*x+1/2*e)+1/6* 
a^3*(212*c^2+366*c*d+133*d^2)/f*tan(1/2*f*x+1/2*e)^3)/(tan(1/2*f*x+1/2*e)^ 
2-1)^5-1/8*a^3*(20*c^2+30*c*d+13*d^2)/f*ln(tan(1/2*f*x+1/2*e)-1)+1/8*a^3*( 
20*c^2+30*c*d+13*d^2)/f*ln(tan(1/2*f*x+1/2*e)+1)
 
3.3.3.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 245, normalized size of antiderivative = 0.95 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x))^2 \, dx=\frac {15 \, {\left (20 \, a^{3} c^{2} + 30 \, a^{3} c d + 13 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )^{5} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, {\left (20 \, a^{3} c^{2} + 30 \, a^{3} c d + 13 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )^{5} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (24 \, a^{3} d^{2} + 8 \, {\left (55 \, a^{3} c^{2} + 90 \, a^{3} c d + 38 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )^{4} + 15 \, {\left (12 \, a^{3} c^{2} + 30 \, a^{3} c d + 13 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )^{3} + 8 \, {\left (5 \, a^{3} c^{2} + 30 \, a^{3} c d + 19 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )^{2} + 30 \, {\left (2 \, a^{3} c d + 3 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{240 \, f \cos \left (f x + e\right )^{5}} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c+d*sec(f*x+e))^2,x, algorithm="f 
ricas")
 
output
1/240*(15*(20*a^3*c^2 + 30*a^3*c*d + 13*a^3*d^2)*cos(f*x + e)^5*log(sin(f* 
x + e) + 1) - 15*(20*a^3*c^2 + 30*a^3*c*d + 13*a^3*d^2)*cos(f*x + e)^5*log 
(-sin(f*x + e) + 1) + 2*(24*a^3*d^2 + 8*(55*a^3*c^2 + 90*a^3*c*d + 38*a^3* 
d^2)*cos(f*x + e)^4 + 15*(12*a^3*c^2 + 30*a^3*c*d + 13*a^3*d^2)*cos(f*x + 
e)^3 + 8*(5*a^3*c^2 + 30*a^3*c*d + 19*a^3*d^2)*cos(f*x + e)^2 + 30*(2*a^3* 
c*d + 3*a^3*d^2)*cos(f*x + e))*sin(f*x + e))/(f*cos(f*x + e)^5)
 
3.3.3.6 Sympy [F]

\[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x))^2 \, dx=a^{3} \left (\int c^{2} \sec {\left (e + f x \right )}\, dx + \int 3 c^{2} \sec ^{2}{\left (e + f x \right )}\, dx + \int 3 c^{2} \sec ^{3}{\left (e + f x \right )}\, dx + \int c^{2} \sec ^{4}{\left (e + f x \right )}\, dx + \int d^{2} \sec ^{3}{\left (e + f x \right )}\, dx + \int 3 d^{2} \sec ^{4}{\left (e + f x \right )}\, dx + \int 3 d^{2} \sec ^{5}{\left (e + f x \right )}\, dx + \int d^{2} \sec ^{6}{\left (e + f x \right )}\, dx + \int 2 c d \sec ^{2}{\left (e + f x \right )}\, dx + \int 6 c d \sec ^{3}{\left (e + f x \right )}\, dx + \int 6 c d \sec ^{4}{\left (e + f x \right )}\, dx + \int 2 c d \sec ^{5}{\left (e + f x \right )}\, dx\right ) \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))**3*(c+d*sec(f*x+e))**2,x)
 
output
a**3*(Integral(c**2*sec(e + f*x), x) + Integral(3*c**2*sec(e + f*x)**2, x) 
 + Integral(3*c**2*sec(e + f*x)**3, x) + Integral(c**2*sec(e + f*x)**4, x) 
 + Integral(d**2*sec(e + f*x)**3, x) + Integral(3*d**2*sec(e + f*x)**4, x) 
 + Integral(3*d**2*sec(e + f*x)**5, x) + Integral(d**2*sec(e + f*x)**6, x) 
 + Integral(2*c*d*sec(e + f*x)**2, x) + Integral(6*c*d*sec(e + f*x)**3, x) 
 + Integral(6*c*d*sec(e + f*x)**4, x) + Integral(2*c*d*sec(e + f*x)**5, x) 
)
 
3.3.3.7 Maxima [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 459, normalized size of antiderivative = 1.79 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x))^2 \, dx=\frac {80 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{3} c^{2} + 480 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{3} c d + 16 \, {\left (3 \, \tan \left (f x + e\right )^{5} + 10 \, \tan \left (f x + e\right )^{3} + 15 \, \tan \left (f x + e\right )\right )} a^{3} d^{2} + 240 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{3} d^{2} - 30 \, a^{3} c d {\left (\frac {2 \, {\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 45 \, a^{3} d^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 180 \, a^{3} c^{2} {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 360 \, a^{3} c d {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 60 \, a^{3} d^{2} {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 240 \, a^{3} c^{2} \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) + 720 \, a^{3} c^{2} \tan \left (f x + e\right ) + 480 \, a^{3} c d \tan \left (f x + e\right )}{240 \, f} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c+d*sec(f*x+e))^2,x, algorithm="m 
axima")
 
output
1/240*(80*(tan(f*x + e)^3 + 3*tan(f*x + e))*a^3*c^2 + 480*(tan(f*x + e)^3 
+ 3*tan(f*x + e))*a^3*c*d + 16*(3*tan(f*x + e)^5 + 10*tan(f*x + e)^3 + 15* 
tan(f*x + e))*a^3*d^2 + 240*(tan(f*x + e)^3 + 3*tan(f*x + e))*a^3*d^2 - 30 
*a^3*c*d*(2*(3*sin(f*x + e)^3 - 5*sin(f*x + e))/(sin(f*x + e)^4 - 2*sin(f* 
x + e)^2 + 1) - 3*log(sin(f*x + e) + 1) + 3*log(sin(f*x + e) - 1)) - 45*a^ 
3*d^2*(2*(3*sin(f*x + e)^3 - 5*sin(f*x + e))/(sin(f*x + e)^4 - 2*sin(f*x + 
 e)^2 + 1) - 3*log(sin(f*x + e) + 1) + 3*log(sin(f*x + e) - 1)) - 180*a^3* 
c^2*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(sin(f*x + e) + 1) + log(sin 
(f*x + e) - 1)) - 360*a^3*c*d*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(s 
in(f*x + e) + 1) + log(sin(f*x + e) - 1)) - 60*a^3*d^2*(2*sin(f*x + e)/(si 
n(f*x + e)^2 - 1) - log(sin(f*x + e) + 1) + log(sin(f*x + e) - 1)) + 240*a 
^3*c^2*log(sec(f*x + e) + tan(f*x + e)) + 720*a^3*c^2*tan(f*x + e) + 480*a 
^3*c*d*tan(f*x + e))/f
 
3.3.3.8 Giac [A] (verification not implemented)

Time = 0.38 (sec) , antiderivative size = 376, normalized size of antiderivative = 1.46 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x))^2 \, dx=\frac {15 \, {\left (20 \, a^{3} c^{2} + 30 \, a^{3} c d + 13 \, a^{3} d^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right ) - 15 \, {\left (20 \, a^{3} c^{2} + 30 \, a^{3} c d + 13 \, a^{3} d^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right ) - \frac {2 \, {\left (300 \, a^{3} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 450 \, a^{3} c d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 195 \, a^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} - 1400 \, a^{3} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 2100 \, a^{3} c d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 910 \, a^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 2560 \, a^{3} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 3840 \, a^{3} c d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 1664 \, a^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 2120 \, a^{3} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 3660 \, a^{3} c d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 1330 \, a^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 660 \, a^{3} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1470 \, a^{3} c d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 765 \, a^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{5}}}{120 \, f} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c+d*sec(f*x+e))^2,x, algorithm="g 
iac")
 
output
1/120*(15*(20*a^3*c^2 + 30*a^3*c*d + 13*a^3*d^2)*log(abs(tan(1/2*f*x + 1/2 
*e) + 1)) - 15*(20*a^3*c^2 + 30*a^3*c*d + 13*a^3*d^2)*log(abs(tan(1/2*f*x 
+ 1/2*e) - 1)) - 2*(300*a^3*c^2*tan(1/2*f*x + 1/2*e)^9 + 450*a^3*c*d*tan(1 
/2*f*x + 1/2*e)^9 + 195*a^3*d^2*tan(1/2*f*x + 1/2*e)^9 - 1400*a^3*c^2*tan( 
1/2*f*x + 1/2*e)^7 - 2100*a^3*c*d*tan(1/2*f*x + 1/2*e)^7 - 910*a^3*d^2*tan 
(1/2*f*x + 1/2*e)^7 + 2560*a^3*c^2*tan(1/2*f*x + 1/2*e)^5 + 3840*a^3*c*d*t 
an(1/2*f*x + 1/2*e)^5 + 1664*a^3*d^2*tan(1/2*f*x + 1/2*e)^5 - 2120*a^3*c^2 
*tan(1/2*f*x + 1/2*e)^3 - 3660*a^3*c*d*tan(1/2*f*x + 1/2*e)^3 - 1330*a^3*d 
^2*tan(1/2*f*x + 1/2*e)^3 + 660*a^3*c^2*tan(1/2*f*x + 1/2*e) + 1470*a^3*c* 
d*tan(1/2*f*x + 1/2*e) + 765*a^3*d^2*tan(1/2*f*x + 1/2*e))/(tan(1/2*f*x + 
1/2*e)^2 - 1)^5)/f
 
3.3.3.9 Mupad [B] (verification not implemented)

Time = 17.10 (sec) , antiderivative size = 287, normalized size of antiderivative = 1.12 \[ \int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x))^2 \, dx=\frac {a^3\,\mathrm {atanh}\left (\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (20\,c^2+30\,c\,d+13\,d^2\right )}{2\,\left (10\,c^2+15\,c\,d+\frac {13\,d^2}{2}\right )}\right )\,\left (20\,c^2+30\,c\,d+13\,d^2\right )}{4\,f}-\frac {\left (5\,a^3\,c^2+\frac {15\,a^3\,c\,d}{2}+\frac {13\,a^3\,d^2}{4}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9+\left (-\frac {70\,a^3\,c^2}{3}-35\,a^3\,c\,d-\frac {91\,a^3\,d^2}{6}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7+\left (\frac {128\,a^3\,c^2}{3}+64\,a^3\,c\,d+\frac {416\,a^3\,d^2}{15}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+\left (-\frac {106\,a^3\,c^2}{3}-61\,a^3\,c\,d-\frac {133\,a^3\,d^2}{6}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+\left (11\,a^3\,c^2+\frac {49\,a^3\,c\,d}{2}+\frac {51\,a^3\,d^2}{4}\right )\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-1\right )} \]

input
int(((a + a/cos(e + f*x))^3*(c + d/cos(e + f*x))^2)/cos(e + f*x),x)
 
output
(a^3*atanh((tan(e/2 + (f*x)/2)*(30*c*d + 20*c^2 + 13*d^2))/(2*(15*c*d + 10 
*c^2 + (13*d^2)/2)))*(30*c*d + 20*c^2 + 13*d^2))/(4*f) - (tan(e/2 + (f*x)/ 
2)*(11*a^3*c^2 + (51*a^3*d^2)/4 + (49*a^3*c*d)/2) + tan(e/2 + (f*x)/2)^9*( 
5*a^3*c^2 + (13*a^3*d^2)/4 + (15*a^3*c*d)/2) - tan(e/2 + (f*x)/2)^7*((70*a 
^3*c^2)/3 + (91*a^3*d^2)/6 + 35*a^3*c*d) - tan(e/2 + (f*x)/2)^3*((106*a^3* 
c^2)/3 + (133*a^3*d^2)/6 + 61*a^3*c*d) + tan(e/2 + (f*x)/2)^5*((128*a^3*c^ 
2)/3 + (416*a^3*d^2)/15 + 64*a^3*c*d))/(f*(5*tan(e/2 + (f*x)/2)^2 - 10*tan 
(e/2 + (f*x)/2)^4 + 10*tan(e/2 + (f*x)/2)^6 - 5*tan(e/2 + (f*x)/2)^8 + tan 
(e/2 + (f*x)/2)^10 - 1))